d = {"张三": 20, "李四": 19, "王五": 26}
# 遍历键值
print(d.items())
for i in d.items():
    print(i)
for k,v in d.items():
    print(k,v)
# 遍历键
# 取得所有的键
print(d.keys())
for k in d.keys():
    print(k,d[k])
# 遍历值
# 获得所有的值
print(d.values())
for v in d.values():
    print(v)
"""
text = "It is a decrease from 310 sets logged in January 2020 when a zero-waste campaign was launched said the museum"
统计下每个单词出现的次数
首先切分字符串 split(" ") 新建一个字典 遍历切分好的列表 
如果列表中的元素在字典中存在 把字典中的元素计数+1 如果不存在 加入字典 计数变为1
d = {'is':1}
"""